package com.freemalll.merchant.mapper.coopManagement;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.freemalll.merchant.domain.dto.MerchantRateDto;
import com.freemalll.merchant.domain.dto.coopManagement.AssetManageDto;
import com.freemalll.merchant.domain.dto.coopManagement.AssetManagePageDto;
import com.freemalll.merchant.domain.entity.coopManagement.MerAssetRateManage;
import com.freemalll.merchant.domain.vo.coopManagement.AssetRatePageVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 映射层。
 *
 * @author songshixiong
 * @since 2025-05-16
 */
@Mapper
public interface MerAssetRateManageMapper extends BaseMapper<MerAssetRateManage> {

    /**
     * 分页查询-按年
     *
     * @param page
     * @param dto
     * @return
     */
    Page<AssetRatePageVo> pageSearch(Page page, @Param("dto") AssetManagePageDto dto);

    /**
     * 分页查询-按月
     *
     * @param page
     * @param dto
     * @return
     */
    Page<AssetRatePageVo> pageSearchMonth(Page page, @Param("dto") AssetManagePageDto dto);


    /**
     * 获取费率列表
     *
     * @param dto
     * @return
     */
    List<AssetRatePageVo> getRateList(@Param("dto") AssetManageDto dto);

    /**
     * 根据资方id查询费率
     *
     * @param sourceIds
     * @return
     */
    List<MerchantRateDto> queryListBySourceId(@Param("sourceIds") List<String> sourceIds, @Param("sceneCategory") String sceneCategory);
}
